package com.lambda.demo.stream;

import com.lambda.demo.models.AuthorsData;

public class StreamfindAnyTest {
  public static void main(String[] args) {
//    输出任意一个年龄>100岁的作家
    AuthorsData.getAuthors().stream()
        .filter(a -> a.getAge() > 100)
        .findAny()
      .ifPresent(a -> System.out.println(a.getName()));
  }
}
